///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "MainFrameUI.h"

///////////////////////////////////////////////////////////////////////////

MainFrameUI::MainFrameUI( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxSize( -1,-1 ) );
	this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	playlistPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxStaticBoxSizer* playlistPanelSizer;
	playlistPanelSizer = new wxStaticBoxSizer( new wxStaticBox( playlistPanel, wxID_ANY, _("Playlist") ), wxVERTICAL );
	
	playlistPicker = new wxFilePickerCtrl( playlistPanel, wxID_ANY, wxEmptyString, _("Select a file"), wxT("Playlist files (*.wpl;*.pls)|*.wpl;*.pls"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
	playlistPicker->SetToolTip( _("Browse...") );
	
	playlistPanelSizer->Add( playlistPicker, 0, wxALL|wxEXPAND, 4 );
	
	playlistPanel->SetSizer( playlistPanelSizer );
	playlistPanel->Layout();
	playlistPanelSizer->Fit( playlistPanel );
	mainSizer->Add( playlistPanel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 4 );
	
	filesPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxStaticBoxSizer* filesPanelSizer;
	filesPanelSizer = new wxStaticBoxSizer( new wxStaticBox( filesPanel, wxID_ANY, _("Files") ), wxVERTICAL );
	
	filesListBox = new wxListBox( filesPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_ALWAYS_SB|wxALWAYS_SHOW_SB|wxHSCROLL|wxVSCROLL ); 
	filesPanelSizer->Add( filesListBox, 1, wxALL|wxEXPAND, 4 );
	
	filesPanel->SetSizer( filesPanelSizer );
	filesPanel->Layout();
	filesPanelSizer->Fit( filesPanel );
	mainSizer->Add( filesPanel, 1, wxALL|wxEXPAND, 4 );
	
	folderPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxStaticBoxSizer* folderPanelSizer;
	folderPanelSizer = new wxStaticBoxSizer( new wxStaticBox( folderPanel, wxID_ANY, _("Folder") ), wxHORIZONTAL );
	
	folderPicker = new wxDirPickerCtrl( folderPanel, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE );
	folderPicker->SetToolTip( _("Browse...") );
	
	folderPanelSizer->Add( folderPicker, 1, wxALL|wxEXPAND, 4 );
	
	exportButton = new wxButton( folderPanel, wxID_ANY, _("Export"), wxDefaultPosition, wxDefaultSize, 0 );
	exportButton->SetToolTip( _("Export...") );
	
	folderPanelSizer->Add( exportButton, 0, wxALL, 4 );
	
	folderPanel->SetSizer( folderPanelSizer );
	folderPanel->Layout();
	folderPanelSizer->Fit( folderPanel );
	mainSizer->Add( folderPanel, 0, wxALL|wxEXPAND, 4 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 4 );
	
	exitPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* exitPanelSizer;
	exitPanelSizer = new wxBoxSizer( wxVERTICAL );
	
	exitButton = new wxButton( exitPanel, wxID_ANY, _("Exit"), wxDefaultPosition, wxDefaultSize, 0 );
	exitButton->SetToolTip( _("Exit") );
	
	exitPanelSizer->Add( exitButton, 0, wxALIGN_RIGHT|wxALL, 4 );
	
	exitPanel->SetSizer( exitPanelSizer );
	exitPanel->Layout();
	exitPanelSizer->Fit( exitPanel );
	mainSizer->Add( exitPanel, 0, wxALL|wxEXPAND, 8 );
	
	this->SetSizer( mainSizer );
	this->Layout();
	
	// Connect Events
	playlistPicker->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( MainFrameUI::OnPlaylistSelected ), NULL, this );
	folderPicker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainFrameUI::OnFolderSelected ), NULL, this );
	exportButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrameUI::OnExport ), NULL, this );
	exitButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrameUI::OnExit ), NULL, this );
}

MainFrameUI::~MainFrameUI()
{
	// Disconnect Events
	playlistPicker->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( MainFrameUI::OnPlaylistSelected ), NULL, this );
	folderPicker->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainFrameUI::OnFolderSelected ), NULL, this );
	exportButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrameUI::OnExport ), NULL, this );
	exitButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrameUI::OnExit ), NULL, this );
}
